<?php

use think\migration\Migrator;


class AlterCouponProductChannelAddIndex extends Migrator
{
    public function up()
    {
        $sql = <<<SQL
        ALTER TABLE `coupon_product_channel` ADD INDEX idx_status_butt_skuType_relateState_shelfState(`status`, `butt`, `sku_type`, `relate_state`, `shelf_state`, `brand_id`) ;
SQL;
        $this->execute($sql);
    }

    public function down()
    {
        $sql = <<<SQL
        DROP INDEX idx_status_butt_skuType_relateState_shelfState ON coupon_product_channel ;
SQL;
        $this->execute($sql);
    }
}
